<?php

/**
 * Created by PhpStorm.
 * User: yf
 * Date: 2018/3/3
 * Time: 下午6:48
 */
namespace App\Model\User;

use EasySwoole\Core\Component\Spl\SplBean;

class UserBean extends SplBean {
	protected $uid;
	protected $phone;
	protected $email;
	protected $password;
	protected $ip;
	protected $serviceid;
	protected $createtime;
	protected $fd;
	protected $name;
	
	/**
	 *
	 * @return the $uid
	 */
	public function getUid() {
		return $this->uid;
	}
	
	/**
	 *
	 * @return the $phone
	 */
	public function getPhone() {
		return $this->phone;
	}
	
	/**
	 *
	 * @return the $email
	 */
	public function getEmail() {
		return $this->email;
	}
	
	/**
	 *
	 * @return the $password
	 */
	public function getPassword() {
		return $this->password;
	}
	
	/**
	 *
	 * @return the $ip
	 */
	public function getIp() {
		return $this->ip;
	}
	
	/**
	 *
	 * @return the $serviceid
	 */
	public function getServiceid() {
		return $this->serviceid;
	}
	
	/**
	 *
	 * @return the $createtime
	 */
	public function getCreatetime() {
		return $this->createtime;
	}
	
	/**
	 *
	 * @return the $fd
	 */
	public function getFd() {
		return $this->fd;
	}
	
	/**
	 *
	 * @return the $name
	 */
	public function getName() {
		return $this->name;
	}
	
	/**
	 *
	 * @param field_type $uid        	
	 */
	public function setUid($uid) {
		$this->uid = $uid;
	}
	
	/**
	 *
	 * @param field_type $phone        	
	 */
	public function setPhone($phone) {
		$this->phone = $phone;
	}
	
	/**
	 *
	 * @param field_type $email        	
	 */
	public function setEmail($email) {
		$this->email = $email;
	}
	
	/**
	 *
	 * @param field_type $password        	
	 */
	public function setPassword($password) {
		$this->password = $password;
	}
	
	/**
	 *
	 * @param field_type $ip        	
	 */
	public function setIp($ip) {
		$this->ip = $ip;
	}
	
	/**
	 *
	 * @param field_type $serviceid        	
	 */
	public function setServiceid($serviceid) {
		$this->serviceid = $serviceid;
	}
	
	/**
	 *
	 * @param field_type $createtime        	
	 */
	public function setCreatetime($createtime) {
		$this->createtime = $createtime;
	}
	
	/**
	 *
	 * @param field_type $fd        	
	 */
	public function setFd($fd) {
		$this->fd = $fd;
	}
	
	/**
	 *
	 * @param field_type $name        	
	 */
	public function setName($name) {
		$this->name = $name;
	}
	function objToArray(bool $is_filter_empty): array {
		if ($is_filter_empty) {
			return $this->toArray ( null, SplBean::FILTER_NOT_EMPTY );
		} else {
			return $this->toArray ();
		}
	}
	protected function initialize(): void {
		// 默认md5是32 位，当从数据库中读出数据恢复为bean的时候，不对密码做md5
	}
}